package by.demchenko.sample.dataaccess.base;

import by.demchenko.sample.datamodel.Course;
import by.demchenko.sample.datamodel.Person;
import by.demchenko.sample.datamodel.enums.UserType;

import java.util.Date;
import java.util.List;

public interface PersonDao extends AbstractDao<Integer, Person> {

    List<Person> getPersonsByType(UserType userType, boolean fetchJoins);

    Person getById(Integer id, boolean fetchJoins);

    <C>List<Person> getStudentsByCriteria(C criterion);

    long getCount(UserType userType);

    boolean isEnrolledInCourse(Person user, Course course, Date startDate);
}
